package cc.mcggdd.leah.boot.stock.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cc.mcggdd.leah.boot.stock.model.entity.StockTrading;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import cc.mcggdd.leah.boot.stock.model.query.StockTradingQuery;
import cc.mcggdd.leah.boot.stock.model.vo.StockTradingVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 交易明细Mapper接口
 *
 * @author 
 * @since 2025-02-13 10:16
 */
@Mapper
public interface StockTradingMapper extends BaseMapper<StockTrading> {

    /**
     * 获取交易明细分页数据
     *
     * @param page 分页对象
     * @param queryParams 查询参数
     * @return
     */
    Page<StockTradingVO> getStockTradingPage(Page<StockTradingVO> page, StockTradingQuery queryParams);

    Long getCountByHoldingId(Long holdingId);

    List<StockTradingVO> selectStockTradingListByHoldingId(Long holdingId);
}
